package com.tsingteng.cosfun.utils;

import android.app.Activity;

import com.tsingteng.cosfun.R;
import com.tsingteng.cosfun.app.DialogListener;
import com.tsingteng.cosfun.widget.dialog.ContentDialog;

import java.util.Objects;

public class DialogUtil {

    public static void  getContentDialog(Activity activity,String content){
        new ContentDialog(activity).setContent(content)
                .setAffirmContent(activity.getResources().getString(R.string.done))
                .setOnOneClickListener(new ContentDialog.OnOneClickListener() {
                    @Override
                    public void onAffirm() {
                    }
                }).show();
    }

    public static void getContentCommentDialog(Activity activity,String content,long woridId,DialogListener listener){
        new ContentDialog(activity).setContent(content).setCancelContent(activity.getResources().getString(R.string.cancel))
                .setAffirmContent(activity.getResources().getString(R.string.cancel_black))
                .setOnTwoClickListener(new ContentDialog.OnTwoClickListener() {
                    @Override
                    public void onAffirm() {
                       listener.clickDialog(woridId);
                    }

                    @Override
                    public void onCancel() {
                    }
                }).show();
    }
}
